﻿using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.EntityFrameworkCore.ValueGeneration;
using Yitter.IdGenerator;

namespace NotifyCenter.EntityFrameworkCore;

public class LongIdValueGenerator : ValueGenerator<long>
{
    public override bool GeneratesTemporaryValues { get; }

    public override long Next(EntityEntry entry)
    {
        return YitIdHelper.NextId();
    }
}
